# coding: utf-8
from application import db


class OauthMemberBind(db.Model):
    __tablename__ = 'oauth_member_bind'

    id = db.Column(db.BigInteger, primary_key=True, unique=True, comment='序号')
    user_id = db.Column(db.BigInteger, comment='用户ID')
    client_type = db.Column(db.String(20), nullable=False, comment='客户端')
    type = db.Column(db.String(60), nullable=False, unique=True, comment='类型')
    openid = db.Column(db.String(50), comment='唯一标识')
    status = db.Column(db.Integer, nullable=False, comment='状态')
    unionid = db.Column(db.String(200), nullable=False, comment='啥')
    extra = db.Column(db.String(500), comment='额外字段')
    created_time = db.Column(db.DateTime, nullable=False, comment='创建时间')
    updated_time = db.Column(db.DateTime, nullable=False, comment='更新时间')
